<template>
    <h2>基本信息</h2>
<span>姓名:{{ info.mname }}</span> <br/>
<span>电话:{{ info.phone }}</span> <br/>
<span>性别:{{ info.sex }}</span> <br/>
<span>生日:{{ info.birenday }}</span> <br/>
<span>余额:{{ info.ymoney }}</span> <br/>
<span>积分:{{ info.jifen }}</span> <br/>
<span>头像:<img :src="info.image" style="width: 70px;height: 70px;"/></span> <br/>
</template>
<script setup lang="ts">
import {ref,onMounted} from 'vue'
import axios from 'axios'
import { useRouter,useRoute } from 'vue-router';
const router=useRouter()
const route=useRoute()


const info=ref({
    mid:0,
    mname:'',
    phone:'',
    sex:'男',
    birenday:'',
    ymoney:0,
    jifen:0,
    image:''
})

onMounted(()=>{
    Xqing()
})
const Xqing=()=>{
    axios.get('https://localhost:7279/api/Meber/GetMeber',{
        params:{
            id:route.params.id
        }
    })
    .then(res=>{
        info.value=res.data
    })
    .catch(err=>{
        console.log(err)
    })
}
</script>